//
//  PickerViewController.h
//  TicketSystem
//
//  Created by ET|冰琳 on 2017/2/14.
//  Copyright © 2017年 UK. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BIActionsDimmerViewController.h"

NS_ASSUME_NONNULL_BEGIN

typedef void(^PickerControllerDataBlock)(NSArray * _Nullable results, NSArray<NSNumber *> * _Nonnull indexes);

typedef NSInteger (^PickerComponentCallBack)();
typedef NSInteger (^PickerRowsCallback)(NSInteger component, NSInteger lastComponentSelectRow);

typedef NSString * _Nonnull (^PickerTextCallback)(id _Nullable data, NSInteger component, NSInteger  row);


@interface PickerViewController : BIActionsDimmerViewController<UIPickerViewDataSource,UIPickerViewDelegate>

@property (nonatomic, strong) UIPickerView *pickerView;
@property (nonatomic, copy)  PickerTextCallback textCallback;

/*
 非联动数据 - 固定数据时使用
 */
@property (nonatomic, strong, nullable) NSArray<NSArray  *> *pickerDatas;
@property (nonatomic, copy, nullable)   NSArray             *selectInfo;

@property (nonatomic, copy)  PickerControllerDataBlock resultBlock;

/*
 联动式picker
 */
@property (nonatomic, copy)  PickerComponentCallBack componentCallback;
@property (nonatomic, copy)  PickerRowsCallback rowsCallback;


@end
NS_ASSUME_NONNULL_END
